//封装banner业务
import { ref,onMounted } from "vue";
import { getBannerAPI } from "@/apis/home";

export function useBanner(){
    const BannerList = ref([]);
    //获取轮播图
    const getBannerList = async () => {
    const res = await getBannerAPI({
      distributionSite: "2",
    });
    // console.log(res);
    BannerList.value = res.result;
  };
  onMounted(async () => {
    await getBannerList();
  });
  return{
    BannerList
  }
}
